package com.yeban.javase.day04.test02;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/12
 */
public class Employee extends Person implements Add{

    private String id;      // 工号ID
    private double wage;    // 工资
    private int workAge;    // 工龄


    public Employee() {
    }

    public Employee(String name, String address, String id, double wage, int workAge) {
        super(name, address);
        this.id = id;
        this.wage = wage;
        this.workAge = workAge;
    }

    @Override
    public void addWage() {
        wage = wage * 1.1;
    }
    /**
     * 获取
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取
     * @return wage
     */
    public double getWage() {
        return wage;
    }

    /**
     * 设置
     * @param wage
     */
    public void setWage(double wage) {
        this.wage = wage;
    }

    /**
     * 获取
     * @return workAge
     */
    public int getWorkAge() {
        return workAge;
    }

    /**
     * 设置
     * @param workAge
     */
    public void setWorkAge(int workAge) {
        this.workAge = workAge;
    }

    @Override
    public String toString() {
        return super.toString() +
                "工号ID：" + id +
                "\n工资：" + wage +
                "\n工龄：" + workAge +
                "年\n";
    }
}
